home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / ai / gaf200b / example / robotarm.dat < prev    next >
Text File  |  1994-06-25  |  4KB  |  129 lines

  1. SIM_SEGMENT Fdbck_Data
  2.  
  3. CYCLE_TIME      0.05
  4.  
  5. !        Name      MIN   MAX
  6. INOUT Movement (-50.0, 50.0)
  7. IN    Current  (-1.0, 1.0)
  8. INOUT Position (0.0, 70.0)
  9. IN    Reference(0.0, 70.0)
  10. LOCAL Last_move(-50.0, 50.0)
  11. IN    Pos_reg (0, 1)
  12.  
  13. ENABLE = Pos_reg OR ( CURRENT > 0.1 AND CURRENT < -0.1 ) OR
  14.          ( MOVEMENT > 0.5 AND MOVEMENT < -0.5 );
  15.  
  16. INITIALIZATION
  17.     Last_move = Movement;
  18.     Position  = 0;
  19.     Movement  = 0;
  20. RESET
  21.     Last_move = Movement;
  22.     Movement  = 0;
  23. PRE_PROCESSING
  24.     Position = DELTA_TIME * ( Movement + Last_move ) / 2 + Position;
  25.     Last_move = Movement;
  26. END;
  27.  
  28. PRESET  ! 0
  29. !    Reference = 70;
  30.     Position  = 0;
  31. END;
  32.  
  33. PRESET  ! 1
  34. !    Reference = 35;
  35.     Position  = 40;
  36. END;
  37.  
  38. PRESET  ! 2
  39. !    Reference = 35;
  40.     Position  = 0;
  41. END;
  42.  
  43. PRESET  ! 3
  44. !    Reference = 35;
  45.     Position  = 70;
  46. END;
  47.  
  48. PRESET  ! 4
  49. !    Reference = 35;
  50.     Position  = 25;
  51. END;
  52.  
  53. DATA_TABLE ( Position, Current, Movement )
  54.                 0       0.4     5
  55.                 10      0.4     10
  56.                 20      0.4     40
  57.                 35      0.4     40
  58.                 50      0.4     40
  59.                 60      0.4     10
  60.                 70      0.4     0
  61.                 70      -0.4    -5
  62.                 60      -0.4    -10
  63.                 50      -0.4    -40
  64.                 35      -0.4    -40
  65.                 20      -0.4    -40
  66.                 10      -0.4    -10
  67.                 0       -0.4    0
  68.                 0.0     0.0     0  ;
  69.  
  70. DATA_TABLE ( Movement, Current, Movement )
  71.                 -50     +0.4    -40
  72.                 -45     +0.4    -37
  73.                 -40     +0.4    -20
  74.                 -30     +0.4    -10
  75.                 -20     +0.4    0
  76.                 -10     +0.4    +10
  77.                 0       +0.4    +20
  78.                 +10     +0.4    +30
  79.                 +20     +0.4    +40
  80.                 +30     +0.4    +47
  81.                 +40     +0.4    +50
  82.                 +45     +0.4    +50
  83.                 +50     +0.4    +50
  84. !
  85.                 -50     +0.2    -45
  86.                 -45     +0.2    -40
  87.                 -40     +0.2    -30
  88.                 -30     +0.2    -20
  89.                 -20     +0.2    -10
  90.                 -10     +0.2    0
  91.                 0       +0.2    +10
  92.                 +10     +0.2    +20
  93.                 +20     +0.2    +30
  94.                 +30     +0.2    +40
  95.                 +40     +0.2    +45
  96.                 +45     +0.2    +50
  97.                 +50     +0.2    +50
  98. !
  99.                 +50     -0.4    +40
  100.                 +45     -0.4    +37
  101.                 +40     -0.4    +20
  102.                 +30     -0.4    +10
  103.                 +20     -0.4    0
  104.                 +10     -0.4    -10
  105.                 0       -0.4    -20
  106.                 -10     -0.4    -30
  107.                 -20     -0.4    -40
  108.                 -30     -0.4    -47
  109.                 -40     -0.4    -50
  110.                 -45     -0.4    -50
  111.                 -50     -0.4    -50
  112. !
  113.                 +50     -0.2    +45
  114.                 +45     -0.2    +40
  115.                 +40     -0.2    +30
  116.                 +30     -0.2    +20
  117.                 +20     -0.2    +10
  118.                 +10     -0.2    0
  119.                 0       -0.2    -10
  120.                 -10     -0.2    -20
  121.                 -20     -0.2    -30
  122.                 -30     -0.2    -40
  123.                 -40     -0.2    -45
  124.                 -45     -0.2    -50
  125.                 -50     -0.2    -50
  126. !
  127.  
  128. END Fdbck_Data;
  129.